#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <assert.h>

const char * path = "lio.txt";

int main() {
    FILE *fp = fopen(path, "w+");
    assert(fp != NULL);
    char buf[] = "hello world!";
    fputs(buf, fp);
    if (fclose(fp) != 0)
        printf("Error in closing file");
    return 0;
}